package com.sv.zgydor.service.impl;

import com.sv.zgydor.dao.ProjectDAO;
import com.sv.zgydor.pojo.pg.TProjectListEntity;
import com.sv.zgydor.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

//import javax.transaction.Transactional;
import java.util.List;

/**
 * Class summary
 * User: kevin
 * Date: 2017/09/19
 * Time: 17:30
 * Description:
 */
@Service
public class ProjectServiceImpl implements ProjectService {

    @Autowired
    private ProjectDAO projectDAO;

    /**
     * 取得所有项目
     * @return 所有项目
     */
    @Override
//    @Transactional(rollbackOn = Exception.class)
    public List<TProjectListEntity> findAllProjects() {
        return this.projectDAO.findAllProjects();
    }

    @Override
    public TProjectListEntity findProjectById(int pid) {
        return this.projectDAO.findProjectById(pid);
    }
}
